package Huihu.src.天梯赛;

import java.util.Scanner;

public class 拯救外星人 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int a = scanner.nextInt();
        int b = scanner.nextInt();
        int c = a + b;
        if (c < 12) {
            int sum = 1;
            for (int i = 1; i <= c; i++) {
                sum *= i;
            }
            System.out.println(sum);
        }
    }
}
